import net from 'net'

const server = net.createServer((socket) => {
  setInterval(() => {
    socket.write('hello world');
  }, 1000);
  socket.on('data', (data) => {
    console.log('server Received data:', data.toString());
  });
});

server.listen(3000, () => {
  console.log('Server is running on port 8080');
});